<template>
	<view>
		<z-paging ref="paging" v-model="dataList" @query="queryList">
			<view class="item" v-for="(item, index) in dataList" :key="index">
				<image :src="item.image"></image>
				<view class="title">
					<view style="flex: 1;">{{item.title}}</view>
					<view class="time">{{item.createtime}}</view>
				</view>
				<view class="sub-title" v-html="item.message"></view>
			</view>
		</z-paging>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				dataList: [],
			};
		},
		onShow() {},
		methods: {
			async queryList(pageNo, pageSize) {
				const params = {
					pageno: pageNo,
				}
				let res = await this.$common.post("/appsystem/xiaoxi", params);
				if (0 == res.code) {
					this.$refs.paging.complete(res.data);
				} else {
					this.$refs.paging.complete(false);
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	.item{
		display: flex;
		flex-direction: column;
		width: 100wh;
		background-color: #fff;
		margin: 20rpx;
		border-radius: 15rpx;
		image{
			width: 100%;
			height: 300rpx;
			border-radius: 15rpx;
		}
		.title{
			display: flex;
			flex-direction: row;
			align-items: center;
			margin: 15rpx 15rpx 0;
			font-size: 36rpx;
			color: #222;
			font-weight: bold;
			.time{
				font-size: 20rpx;
				color: #888;
				font-weight: normal;
			}
		}
		.sub-title{
			margin: 15rpx;
			font-size: 24rpx;
			color: #555;
		}
	}
	
</style>